// @ts-nocheck
// vetur.config.js
// /** @type {import('vls').VeturConfig} */
const { readdirSync } = require('fs');
const path = require('path');
const componentPath = path.join(__dirname, './src/components')
const components = readdirSync(componentPath)
module.exports = {
  projects: [
    {
      root: './',
      package: './package.json',
      jsconfig: './jsconfig.json',
      // **optional** default: `[]`
      // Register globally Vue component glob.
      // If you set it, you can get completion by that components.
      // It is relative to root property.
      // Notice: It won't actually do it. You need to use `require.context` or `Vue.component`
      globalComponents: [
        './src/components/**/*.vue',
        // {
        //   // Component name
        //   name: 'ProTable',
        //   // Component file path, please use '/'.
        //   path: './src/components/ProTable/index.vue'
        // }
      ].concat(components.map(name => {
        return {
          // Component name
          name,
          // Component file path, please use '/'.
          path: `./src/components/${name}/index.vue`
        }

      })),
    }
  ]
}
